package cn.base.day08;

import java.util.ArrayList;

public class Test20 {
    public static void main(String[] args) {
        ArrayList<Teacher> list = new ArrayList<>();
        // 姓名：果果老师, 专业：javase
        // 姓名：张1老师, 专业：javaee
        // 姓名：张2老师, 专业：php
        // 姓名：张3老师, 专业：python
        list.add(new Teacher("果果老师", "javaSe"));
        list.add(new Teacher("张1老师", "javaee"));
        list.add(new Teacher("张2老师", "php"));
        list.add(new Teacher("张3老师", "python"));
        for (int i = list.size() - 1; i >= 0; i--) {
            System.out.println(list.get(i).getName() + "---" + list.get(i).getMajor());
        }
    }
}
